//
//  UIViewController+RefreshTag.h
//  
//
//  Created by wjxfhxy on 16/7/7.
//
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger , UIViewControllerRefreshTagType)
{
    UIViewControllerRefreshTagTypeNone = 0,
    UIViewControllerRefreshTagTypeLocalRefresh = 1,
    UIViewControllerRefreshTagTypeNetRefresh = 2,
    
    UIViewControllerRefreshTagTypeInfoLocalRefresh = UIViewControllerRefreshTagTypeLocalRefresh,
    UIViewControllerRefreshTagTypeInfoNetRefresh = UIViewControllerRefreshTagTypeNetRefresh,
    UIViewControllerRefreshTagTypeListLocalRefresh = 4,
    UIViewControllerRefreshTagTypeListNetRefresh = 8,
    
    UIViewControllerRefreshTagTypeInfoCacheRefresh = 16,
    UIViewControllerRefreshTagTypeListCacheRefresh = 32
};

@interface UIViewController (RefreshTag)

@property(nonatomic,assign,readonly) NSUInteger viewControllerRefreshTag;

//@property(nonatomic,strong,readonly) NSObject *infoAttachData;
//
//@property(nonatomic,strong,readonly) NSObject *listAttachData;

-(NSArray*)listCacheData;

-(id)infoCacheData;

/**
 *  Net，Local，Cache互斥
 *  Info和List不互斥
 *  且NetRefresh优先级高，Net > Local > Cache
 *  Info List 忽略cacheData
 *
 *  @param refreshTag <#refreshTag description#>
 *  @param attachData <#attachData description#>
 */

-(void)addViewControllerRefreshTag:(UIViewControllerRefreshTagType)refreshTag;

-(void)setViewControllerListCacheData:(id)cacheData;

-(void)setViewControllerInfoCacheData:(id)cacheData;


@end
